/*
 * TabPage.java
 *
 * Created on  2004-09-20 +0900
 *
 * $Revision: 38 $
 * $Date: 2008-10-11 08:48:45 +0000 (Sat, 11 Oct 2008) $
 */

package org.gikolet.framework.ui;

/**
 * @author Tetsutaro (latest modification by $Author: tetsutaro.ss $)
 * @version $Revision: 38 $ $Date: 2008-10-11 08:48:45 +0000 (Sat, 11 Oct 2008) $
 */
public class TabPage extends Panel {
    public TabPage() {
	this(null);
    }

    public TabPage(String name) {
	super();

	super.setVisible(false);
	setName(name);
    }

    public void setBounds(int x, int y, int width, int height) {
	super.setBounds(getX(), getY(), getWidth(), getHeight());
    }

    public void setVisible(boolean visible) {
	super.setVisible(isVisible());
    }

    void setBoundsFromTabControl(int x, int y, int width, int height) {
	super.setBounds(x, y, width, height);
    }

    void setVisibleFromTabControl(boolean visible) {
	super.setVisible(visible);
    }

    /**
     * @see org.gikolet.framework.ui.Container#firePropertyChanged(java.lang.String)
     */
    protected void firePropertyChanged(String propertyName) {
	if (PROPERTY_NAME.equals(propertyName)) {
	    revalidate();
	    repaint();
	}
	super.firePropertyChanged(propertyName);
    }
}
